#include <iostream>
using namespace std;

int main() {
    double a;
    char ch;

    cin >> a >> ch;

    double sum = 0;
    if (a <= 1)
        sum += 20;
    else
    {
        int a1 = a;
        sum += 20;
        sum = sum + (a1 - 1) / 1;
        if (a - a1 > 0)
            sum = sum + 1;
    }

    if (ch == 'y')
        sum = sum + 5;

    cout << sum << endl;

    return 0;

}